package C7_5_CompositeReplaceImplicitTree.before;

import java.util.List;

/**
 * @author xufy
 * @version 1.0
 * @description todo
 * @date 2022/9/9
 **/
public class Orders {

    private int orderCount;
    private List<Order> orders;

    public int getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(int orderCount) {
        this.orderCount = orderCount;
    }

    public Order getOrder(int i) {
        return orders.get(i);
    }
}
class Order{
    private int orderId;
    private int productCount;
    private List<Product> products;

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }
    public Product getProduct(int i) {
        return products.get(i);
    }
}
class Product{
    private int id;
    private int price;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}